import { _decorator, Component, Label, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('HUB_Distance')
export class HUB_Distance extends Component {
    @property(Node) play:Node;
    start() {

    }

    update(deltaTime: number) {
        this.node.getComponent(Label).string=this.play.position.z.toFixed(0);
    }
}

